import {Component, ComponentType} from "react";
import Main from "../Main";
import TaskList from "../page/Index/task/TaskList";
import TaskCreate from "../page/Index/task/TaskCreate";

interface route {
    icon?: string
    title: string
    path: string
    component?: ComponentType
    sub?: Array<route>
}

/**
 * Index 页面的子路由。
 */
const indexRouteArray: Array<route> = [
    {
        title: '计划任务管理',
        path: '/task',
        //@ts-ignore
        sub: [
            {
                title: '计划任务',
                path: '/index/task/list',
                component: TaskList
            },
            {
                title: '新建计划任务',
                path: '/index/task/create',
                component: TaskCreate
            }
        ]
    }

]


export default indexRouteArray